package com.zline.foodraise.adapter;

import android.content.Context;
import android.view.ViewGroup;

import com.zline.foodraise.entity.City;
import com.zline.foodraise.view.ChooseCityListItem;
import com.zline.foodraise.view.ChooseCityListItem_;

import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.RootContext;

/**
 * Created by heshantao on 15/7/13.
 */
@EBean
public class ChooseCityAdapter extends RecyclerViewBaseAdapter<City,ChooseCityListItem> {
    private static final String LOG_TAG=ChooseCityAdapter.class.getSimpleName();
    @RootContext
    Context cxt;
    @Override
    protected ChooseCityListItem onCreateItemView(ViewGroup parent, int viewType) {
        return ChooseCityListItem_.build(cxt);
    }

    @Override
    public void onBindViewHolder(ViewWrapper<ChooseCityListItem> holder, int position) {
        ChooseCityListItem view=holder.getView();
        City city=arrys.get(position);
        view.setRecycleItemListener(itemClicked);
        view.bind(city,position);
    }
}
